
<fieldset id="info_edit"><legend>基本信息</legend>
<form id="form_edit"><input type="hidden" name="info_id" value="{[$result.id]}">
<table>
	<tr>
		<td width="20%" align="right">简称：</td>
		<td width="30%"><input type="text" name="name" size="16" value="{[$result.name]}"></td>
		<td width="20%" align="right">等级：</td>
		<td width="30%"><input type="radio" class="star" name="star" value="1" {[if $result.star eq '1']}checked{[/if]}/> <input
			type="radio" class="star" name="star" value="2" {[if $result.star eq '2']}checked{[/if]}/> <input type="radio"
			class="star" name="star" value="3" {[if $result.star eq '3']}checked{[/if]}/> <input type="radio" class="star"
			name="star" value="4" {[if $result.star eq '4']}checked{[/if]}/> <input type="radio" class="star" name="star" value="5"
			{[if $result.star eq '5']}checked{[/if]}/></td>
	</tr>
	<tr>
		<td align="right">全称：</td>
		<td colspan="3"><input type="text" name="fullname" size="45" value="{[$result.fullname]}"></td>
	</tr>
	<tr>
		<td align="right">证件：</td>
		<td colspan="3"><input type="text" name="cert_no" size="35" value="{[$result.cert_no]}" title="请根据证件类型输入证件号码"> <select name='cert_type' id='type'> {[html_options
					options=$cert_type_option selected=$result.cert_type]}
			</select></td>
	</tr>
	<tr>
		<td align="right">大类：</td>
		<td colspan="3"><input type="text" name="category" id="category" size="16" value="{[$result.category]}"> <select
			name='category_t' id='category_t'>
			{[html_options options=$category_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td align="right">小类：</td>
		<td colspan="3"><input type="text" name="type" id="type" size="16" value="{[$result.type]}"> <select name='type_t'
			id='type_t'>
		</select></td>
	</tr>
	<tr>
		<td align="right">网站：</td>
		<td colspan="3"><input type="text" name="url" size="45" value="{[$result.url]}"></td>
	</tr>
	<tr>
		<td align="right">地址：</td>
		<td colspan="3"><textarea rows="3" name="address" cols="55">{[$result.address]}</textarea></td>
	</tr>
	<tr>
		<td align="right">是否共享：</td>
		<td colspan="3"><select name='share'>
			{[html_options options=$share_option selected=$result.share]}
		</select></td>
	</tr>
	<tr>
		<td align="right">付款方式：</td>
		<td colspan="3"><input type="text" name="pay" id="pay" size="16" value="{[$result.pay]}"> <select name='pay_t'
			id='pay_t'>
			{[html_options options=$pay_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td align="right">付款币种：</td>
		<td colspan="3"><select name='currency' id='currency'>
			{[html_options options=$currency_option selected=$result.currency]}
		</select></td>
	</tr>
	<tr>
		<td align="right">付款税率：</td>
		<td colspan="3"><input type="text" name="tax" id="tax" size="8" value="{[$result.tax|default:'17']}">（单位：%）</td>
	</tr>
	<tr>
		<td align="right">简介：</td>
		<td colspan="3"><textarea rows="5" name="jj" cols="55">{[$result.jj]}</textarea></td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><textarea rows="3" name="content" cols="55">{[$result.content]}</textarea></td>
	</tr>
	<tr>
		<td align="right">负责人：</td>
		<td><input type="text" name="emp" id="emp" value="{[$result.emp]}:{[$result.emp_t]}" size="12" title="{[$t.emp_|emp:'负责人']}"> <input
			type="checkbox" name="t_emp" id="t_emp" value="{[$smarty.session.id]}:{[$smarty.session.name]}"> 自己</td>
		<td align="right">状态：</td>
		<td><select name='status'>
			{[html_options options=$status_option selected=$result.status]}
		</select></td>
	</tr>
</table>
</form>
</fieldset>

{[foreach name=outer key=key item=item from=$contact]}
{[assign var="no" value="`$no+1`"]}
<fieldset id="contact{[$no]}"><legend>联系人</legend>
<form id="form{[$no]}"><input type="hidden" name="id" id="id" value="{[$item.id]}">
<table id="table{[$no]}">
	<tr>
		<td align="right">姓名：</td>
		<td colspan="3"><input type="text" name="linkman" id="linkman" size="16" value="{[$item.name]}">
		<input type="text" name="job" id="job" size="12" value="">
		<select name='job_t' id='job_t' onchange="on_job(this.form)">
			{[html_options options=$job_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td align="right">部门：</td>
		<td colspan="3"><input type="text" name="dept" id="dept" size="16" value="{[$item.dept]}">
		<select name='dept_t' id='dept_t' onchange="on_dept(this.form)">
			{[html_options options=$dept_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td width="20%" align="right">电话：</td>
		<td width="30%"><input type="text" name="tel" id="tel" size="16" value="{[$item.tel]}"></td>
		<td width="20%" align="right">传真：</td>
		<td width="30%"><input type="text" name="fax" id="fax" size="16" value="{[$item.fax]}"></td>
	</tr>
	<tr>
		<td align="right">手机：</td>
		<td><input type="text" name="mobile" id="mobile" size="16" value="{[$item.mobile]}"></td>
		<td align="right">短号：</td>
		<td><input type="text" name="dh" id="dh" size="16" value="{[$item.dh]}"></td>
	</tr>
	<tr>
		<td align="right">电邮：</td>
		<td colspan="3"><input type="text" name="email" id="email" size="40" value="{[$item.email]}"></td>
	</tr>
	<tr>
		<td align="right">地址：</td>
		<td colspan="3"><input type="text" name="address" id="address" size="40" value="{[$item.address]}"></td>
	</tr>
	<tr>
		<td align="right">QQ：</td>
		<td><input type="text" name="qq" id="qq" size="16" value="{[$item.qq]}"></td>
		<td align="right">skype：</td>
		<td><input type="text" name="skype" id="skype" size="16" value="{[$item.skype]}"></td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><input type="text" name="content" size="40" value="{[$item.content]}"></td>
	</tr>
	<tr>
		<td align="right"></td>
		<td colspan="3" id="action{[$no]}"></td>
	</tr>
</table>
</form>
</fieldset>
{[foreachelse]}
<fieldset id="contact1"><legend>联系人</legend>
<form id="form1">
<table id="table1">
	<tr>
		<td align="right">姓名：</td>
		<td colspan="3"><input type="text" name="linkman" id="linkman" size="16" value="">
		<input type="text" name="job" id="job" size="12" value="">
		<select name='job_t' id='job_t' onchange="on_job(this.form)">
			{[html_options options=$job_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td align="right">部门：</td>
		<td colspan="3"><input type="text" name="dept" id="dept" size="16" value="{[$item.dept]}">
		<select name='dept_t' id='dept_t' onchange="on_dept(this.form)">
			{[html_options options=$dept_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td width="20%" align="right">电话：</td>
		<td width="30%"><input type="text" name="tel" id="tel" size="16" value=""></td>
		<td width="20%" align="right">传真：</td>
		<td width="30%"><input type="text" name="fax" id="fax" size="16" value=""></td>
	</tr>
	<tr>
		<td align="right">手机：</td>
		<td><input type="text" name="mobile" id="mobile" size="16" value=""></td>
		<td align="right">短号：</td>
		<td><input type="text" name="dh" id="dh" size="16" value=""></td>
	</tr>
	<tr>
		<td align="right">电邮：</td>
		<td colspan="3"><input type="text" name="email" id="email" size="40" value=""></td>
	</tr>
	<tr>
		<td align="right">地址：</td>
		<td colspan="3"><input type="text" name="address" id="address" size="40" value=""></td>
	</tr>
	<tr>
		<td align="right">QQ：</td>
		<td><input type="text" name="qq" id="qq" size="16" value=""></td>
		<td align="right">skype：</td>
		<td><input type="text" name="skype" id="skype" size="16" value=""></td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><input type="text" name="content" size="40" value=""></td>
	</tr>
	<tr>
		<td align="right"></td>
		<td colspan="3" id="action1"></td>
	</tr>
</table>
</form>
</fieldset>
{[/foreach]}

<div id="contact_new" style="margin-top: 8px;"><a href="javascript:void(0)" onclick="ContactEdit.add()">+联系人</a></div>

<fieldset id="t_add" style="display: none;"><legend>主联系人 1</legend>
<form id="t_form">
<table>
	<tr>
		<td align="right">姓名：</td>
		<td colspan="3"><input type="text" name="linkman" id="linkman" size="16" value="">
		<input type="text" name="job" id="job" size="12" value="">
		<select name='job_t' id='job_t' onchange="on_job(this.form)">
			{[html_options options=$job_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td align="right">部门：</td>
		<td colspan="3"><input type="text" name="dept" id="dept" size="16" value="{[$item.dept]}">
		<select name='dept_t' id='dept_t' onchange="on_dept(this.form)">
			{[html_options options=$dept_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td width="20%" align="right">电话：</td>
		<td width="30%"><input type="text" name="tel" id="tel" size="16" value=""></td>
		<td width="20%" align="right">传真：</td>
		<td width="30%"><input type="text" name="fax" id="fax" size="16" value=""></td>
	</tr>
	<tr>
		<td align="right">手机：</td>
		<td><input type="text" name="mobile" id="mobile" size="16" value=""></td>
		<td align="right">短号：</td>
		<td><input type="text" name="dh" id="dh" size="16" value=""></td>
	</tr>
	<tr>
		<td align="right">电邮：</td>
		<td colspan="3"><input type="text" name="email" id="email" size="40" value=""></td>
	</tr>
	<tr>
		<td align="right">地址：</td>
		<td colspan="3"><input type="text" name="address" id="address" size="40" value=""></td>
	</tr>
	<tr>
		<td align="right">QQ：</td>
		<td><input type="text" name="qq" id="qq" size="16" value=""></td>
		<td align="right">skype：</td>
		<td><input type="text" name="skype" id="skype" size="16" value=""></td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><input type="text" name="content" size="40" value=""></td>
	</tr>
	<tr>
		<td align="right"></td>
		<td colspan="3" id="t_action"></td>
	</tr>
</table>
</form>
</fieldset>

<script src="/js/plugin/jquery.rating.js?r={[$smarty.now]}" type="text/javascript" language="javascript"></script>

<script type="text/javascript" src="js/contact_edit.js?r={[$smarty.now]}"></script>
<script type="text/javascript" src="js/contact/supplier/edit.js?r={[$smarty.now]}"></script>
